package com.gitee.yannzh.rune.support.crud.annotation;

import com.gitee.yannzh.rune.core.base.pojo.Entity;
import com.gitee.yannzh.rune.core.base.pojo.Param;
import com.gitee.yannzh.rune.support.crud.constants.ApiMethod;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Rune {

    Class<? extends Entity> entityType();

    Class<? extends Param> paramType();

    Class<? extends Param> saveType() default  Param.class;

    Class<? extends Param> updateType() default  Param.class;

    Class<? extends Param> queryType() default  Param.class;

    String[] api() default {ApiMethod.GET, ApiMethod.LIST, ApiMethod.PAGE, ApiMethod.SAVE, ApiMethod.UPDATE, ApiMethod.DELETE,ApiMethod.BATCH_DELETE};


}
